<?php 
$appId = 'wx3464c6b9fd10bf5c';
$secret = '14261ef0ece5d043f5bdea33eabee81b';
include_once './jssdk.php';
$jssdk = new JSSDK($appId, $secret);
$signPackage = @$jssdk->GetSignPackage();
?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>爽约自救指南</title>
<style>
html,body{width:100%;font-size:12px;font-family:Helvetica,Tahoma, Arial, STXihei,Microsoft YaHei, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;}
body{position:relative;background:#ffffff;}
body, div{padding:0px;margin:0px auto;max-width:750px;}
.weui-dialog{position:fixed;z-index:5000;width:80%;max-width:300px;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#FFF;text-align:center;border-radius:3px;overflow:hidden}.weui-dialog__hd{padding:1.3em 1.6em .5em}.weui-dialog__title{font-weight:400;font-size:18px}.weui-dialog__bd{padding:0 1.6em .8em;min-height:40px;font-size:15px;line-height:1.3;word-wrap:break-word;word-break:break-all;color:#999}.weui-dialog__bd:first-child{padding:1.2em 20px .1em;color:#353535}.weui-dialog__ft{position:relative;line-height:48px;font-size:18px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-dialog__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1px solid #D5D5D6;color:#D5D5D6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.weui-dialog__btn{display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3CC51F;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative}.weui-dialog__btn:active{background-color:#EEE}.weui-dialog__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1px solid #D5D5D6;color:#D5D5D6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleX(.5);transform:scaleX(.5)}.weui-dialog__btn:first-child:after{display:none}.weui-dialog__btn_default{color:#353535}.weui-dialog__btn_primary{color:#0BB20C}@media screen and (min-width:1024px){.weui-dialog{width:35%}}.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,.6)}
.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}
.js_dialog{display:none;}
-webkit-touch-callout:none;
-webkit-user-select:none;
html{-ms-touch-action:none;}
div,img{-webkit-tap-highlight-color:rgba(0,0,0,0);}
*{-webkit-text-size-adjust: none;}
.simg{position:absolute;display:block;}
a{text-decoration:none;}
.txt{position:absolute;text-indent:4px;color:#787c7f;font-size:12px;z-index:2;border:none;background:transparent;}
.txt::-webkit-input-placeholder {text-align:left;}
select{position:absolute;color:#787c7f;display:block;background:transparent;border:0px;text-indent:4px;font-size:12px;-webkit-appearance:none;}
.container{position:relative;width:100%;height:auto;/**overflow:hidden; */}
.page{position:absolute;width:100%;height:100%;display:none;}
.bg{position:absolute;width:100%;top:0;left:0;}
.p1-up, .p1-down{position:absolute;width:100%;height:40%;left:0;}
.p1-up{background:#f5c03e;top:0;}
.p1-down{background:#6ec2c1;bottom:0;}
.p1{background:#6ec2c1;}
.p1-top{position:absolute;top:0;right:0;z-index:6;}
@keyframes tada {
  from {
    transform: scale3d(1, 1, 1);
  }

  10%,
  20% {
    transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
  }

  30%,
  50%,
  70%,
  90% {
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
  }

  40%,
  60%,
  80% {
    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
  }

  to {
    transform: scale3d(1, 1, 1);
  }
}
.tada {
  animation-name: tada;
}
.animated{animation-duration: 1.5s;animation-fill-mode: both;}
.animated.infinite{animation-iteration-count:infinite;}
.animated.d5{animation-delay: .5s;}
.p-bg, .bg-tu{position:absolute;width:100%;top:0;left:0;}
.p-tu{position:absolute;display:block;width:100%;}
.kou-top{position:absolute;left:0;width:100%;}
.kou-top{top:0;z-index:2}
.kou-di{position:absolute;bottom:0;right:0;}
.kou-k{z-index:3;}
.kou-b{z-index:6;}
.kou-save{position:absolute;z-index:6;width:100%;height:100%;top:0;left:0;opacity:0;}
.p-mu{position:absolute;z-index:7;}
.hide{display:none;}
.z2{z-index:2;}
.p1-bt{z-index:4;}
</style><script>var _hmt = _hmt || [];(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?bb8ad34316032ef3751a529a820d0dab";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script></head><body>
<div class="container">
     <div class="p1 page">
         <div class="p1-up"></div>
         <div class="p1-down"></div>
         <img class="p1-top" src="./img/p1-top.jpg" />
         <img class="bg-tu simg" src="./img/p2.jpg?v=13" />
         <img class="bg-tu z2 simg" src="./img/p1-g2.png" />
         <div class="p-bg">
             <img class="bg-tu simg" src="./img/p1-g.png" />
             <img class="p1-bt tada animated d5 infinite simg" src="./img/p1-bt.png" />
             <img class="p1-bt p1-bta animated d5 infinite hide simg" src="./img/p1-bta.png" />
         </div>
         <img class="p-mu" src="./img/m.png" />
     </div>
     <div class="kou page">
        <img class="kou-top kou-tb1 simg" src="./img/k1/t.png" />
        <img class="kou-top kou-tb simg" src="./img/k1/b.png" />
        <div class="p-bg">
        	<img class="p-tu kou-k simg" src="./img/k1/k.png" />
        	<img class="kou-b simg" src="./img/p2-l.png" />
            <img class="kou-b kou-ba hide simg" src="./img/p2-la.png" />
        </div>
        <img class="kou-di" src="./img/k1/d.png" />
        <img class="kou-save" src="./img/kou.jpg" />
        <img class="p-mu" src="./img/m.png" />
    </div>
 
  
 <div style="display:none;">
    <audio id="bgm" preload="auto" autoplay loop="loop">
        <source src='http://cdn.omnimkt.com/ice/m.mp3' type="audio/mp3">
        <source src="http://cdn.omnimkt.com/ice/m.ogg" type="audio/ogg">
    </audio>
 </div>
  
</div>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="./pxloader-images.min.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script>
_h=h= Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var sWidth = parseInt((window.innerWidth > 0) ? window.innerWidth : screen.width);
if(sWidth>750){sWidth=750;}
var _rate=(sWidth/750);

if(h<_rate*1206){h=_rate*1206;}
var _img=['p1.jpg'];
var loader = new PxLoader();
for(var i=0; i<_img.length; i++){loader.addImage('./img/'+_img[i]);}

var _volm=0.01;
function upVolu(){
	_volm=_volm+0.01;
	console.log(_volm);
	document.getElementById("bgm").volume = _volm;
	if(_volm > 0.98){
	 document.getElementById("bgm").volume = 1;
	 return;
	} 
	window.setTimeout(function(){upVolu();}, 800);
}
loader.start();
var _bgm = document.getElementById('bgm');
loader.addCompletionListener(function(e){
	document.getElementById("bgm").volume = _volm;
	_bgm.play();
	window.setTimeout(function(){upVolu();}, 3000);
    document.addEventListener("WeixinJSBridgeReady", function () {
    	_bgm.play();
        }, false);
	$(".p1").show().addClass("fade-in");
 
});
var _choosePage='泡泡';
$(function(){
	$('body').on('touchmove',function(e){
		//e.preventDefault();
	});
	$('.container, .hai').width(sWidth).height(h);
	$('.p-bg, .bg-tu').width(sWidth).height(_rate*1206);
	$('.p1-top').width(_rate*189).height(_rate*153);
	$('.p1-bt').width(_rate*316).height(_rate*116).css({"top":_rate*1034, "left":_rate*216});
	$('.kou-b').hide().width(_rate*116).height(_rate*95).css({"bottom":_rate*30, "left":_rate*42});
	$('.p-mu').width(_rate*83).height(_rate*79).css({"bottom":_rate*120, "left":_rate*650});
	if(h > _rate*1206){
	   var _cha= (h - _rate*1320)/2;
	   if(_cha > 0){
	      $('.p-bg').css({"top":_cha});
	   }
	}
	if(_h < 590){
		$('.p-bg').css({"zoom":.92, "left":sWidth*0.04});
	}  




	$('.p1-bt').bind("click",function(){
		$('.p1-bta').fadeIn(400);
        var _id=Math.floor(Math.random()*3)+1;
        if(1 == _id){
        	$(".kou").css("background", "#e086a2");
          	$(".kou-tb1").attr("src", "./img/k2/t.png");
        	$(".kou-tb").attr("src", "./img/k2/b.png");  
        	$(".kou .p-tu").attr("src", "./img/k2/k.png?s=1");
        	$(".kou-di").attr("src", "./img/k2/d.png");
        	$('.kou-di').width(_rate*267).height(_rate*84);
        	$(".kou-save").attr("src", "./img/kou2.jpg");
        }else if(2 == _id){
        	$(".kou").css("background", "#70c3ab");
        	$(".kou-tb1").attr("src", "./img/k1/t.png");
        	$(".kou-tb").attr("src", "./img/k1/b.png");  
        	$(".kou .p-tu").attr("src", "./img/k1/k.png?s=1");
        	$(".kou-di").attr("src", "./img/k1/d.png");
        	$('.kou-di').width(_rate*182).height(_rate*73);
        	$(".kou-save").attr("src", "./img/kou.jpg");
        }else{
        	$(".kou").css("background", "#80b9df"); 
        	$(".kou-tb1").attr("src", "./img/k3/t.png");
        	$(".kou-tb").attr("src", "./img/k3/b.png");  
        	$(".kou .p-tu").attr("src", "./img/k3/k.png?s=1");
        	$(".kou-di").attr("src", "./img/k3/d.png");
        	$('.kou-di').width(_rate*247).height(_rate*93);
        	$(".kou-save").attr("src", "./img/kou3.jpg");
        }
		
		window.setTimeout(function(){
        $(".p1").hide();
        $(".kou").fadeIn();
		}, 400);


		
		_hmt.push(['_trackEvent', '首页', 'get爽约口令lbs']);
		 
	});
	
	 
	var _musicOn='on';
	$('.p-mu').bind("click",function(){
		if('on' == _musicOn){
			_bgm.pause();
			$('.p-mu').attr("src",'./img/m-off.png');
			_musicOn='off';
		}else{
			_bgm.play();
			_musicOn='on';
			$('.p-mu').attr("src",'./img/m.png');
		}
		
	});
 
	wx.config({
    	appId: '<?php echo $signPackage["appId"];?>',timestamp: <?php echo $signPackage["timestamp"];?>,
    	nonceStr: '<?php echo $signPackage["nonceStr"];?>',signature: '<?php echo $signPackage["signature"];?>',
    	jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage','onMenuShareQQ','showMenuItems','showOptionMenu','updateAppMessageShareData','updateTimelineShareData']
    });
	wx.ready(function (){
        var _link='http://bellagio.omnimkt.com/ice/';
        var _imgUrl='http://bellagio.omnimkt.com/content/img/64.png';
		wx.updateAppMessageShareData({ 
	        title: '在吗？我们爽约一夏？',  
	        desc: '不做鸽子王，只做小甜心，我想和你爽快约一次~',  
	        link: _link,  
	        imgUrl: _imgUrl,  
	        success: function () {}
	    })
	    wx.updateTimelineShareData({ 
            title: '被鸽？我有自救指南！', 
            link: _link, 
            imgUrl: _imgUrl,
            success: function () {
            }
        }) 	
	}); 
 
	
});
</script></body></html>